import axios from "axios";
import { getToken } from "./token";
import { Message } from "element-ui";

axios.defaults.baseURL = "http://127.0.0.1:8888/api/private/v1/";

//请求拦截器
axios.interceptors.request.use(config => {
  //在发送请求前
  config.headers.Authorization = getToken();
  return config;
});

export default axios; //直接返回axios;
